home *** CD-ROM | disk | FTP | other *** search
/ The Original Shareware 1.1 / The Original Shareware (WeMake CDs)(Volume 1.1)(CDs, Inc)(1993).iso / 19 / envi.zip / DOS.INC next >
Text File  |  1986-03-28  |  864b  |  26 lines

  1. {DOS.INC :
  2.    This returns a real number representing the DOS version of the
  3.  system executing the program. It requires no types, variables or
  4.  identifiers outside the body of the function.}
  5.  
  6. FUNCTION DOS : Real;          {returns DOS version number}
  7. VAR
  8.   registers : RECORD
  9.                 al, ah : Byte;
  10.                 bx, cx, dx, bp, si, di, ds, es, flags : Integer;
  11.               END;
  12. BEGIN
  13.   registers.ah := $30;        {Call MS-DOS function $30.}
  14.   MsDos(registers);
  15.  
  16. {The major version returns in al, the minor in ah.}
  17.  
  18.   DOS := registers.al+(1.0*registers.ah)/100;
  19. END;                          {DOS}
  20.  
  21. { All of this horribly over-commented code, which should ARC admirably,
  22.   is the product of
  23.                     Karl Brendel, CIS 73307,3101
  24.                     718 East B Avenue
  25.                     Hutchinson, Kansas  67501 }
  26.